import java.util.Random;


public class Bonus extends GameObject {
	
	private BonusType type;
	private Random random = new Random();
	private int randomType;
	
	public Bonus(int posX,int posY,int width,int length){
		super(posX, posY, width, length);	
		
		randomType = random.nextInt(6);
		setType(randomType);
	}
	
	public void setType(int bonusType){
		
		switch(bonusType)
		{
			case 0:
				type = BonusType.EXTRA_LIFE;
				break;
			case 1:
				type = BonusType.INVINCIBILITY;
				break;
			case 2:
				type = BonusType.SLOW_DOWN;
				break;
			case 3:
				type = BonusType.BONUS_SCORE;
				break;
			case 4:
				type = BonusType.GET_FAT;
				break;
			case 5:
				type = BonusType.CAUGHT_ON_FIRE;
				break;
			default:
				type = BonusType.NO_BONUS;
				break;
		}
	}
	public BonusType getType(){
		return type;
	}
}